package com.nathan.crm.service;

import com.nathan.base.BaseService;
import com.nathan.crm.dao.PermissionMapper;
import com.nathan.crm.vo.Permission;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PermissionService extends BaseService<Permission,Integer> {

    @Resource
    private PermissionMapper permissionMapper;

    /**
     * 根据用户id查询其所拥有的所有资源权限码
     *
     * @param userId
     * @return
     */
    public List<String> countUserHasPermissionByUserId(int userId) {
        return permissionMapper.countUserHasPermissionByUserId(userId);
    }
}
